//index.js
//获取应用实例
const app = getApp()
Page({
  data: {
    // 所在地区
    regIndex: '1a0',
    positionFlag: true,
    area: null,
  },
  onLoad: function () {
   
  },
  // 所在地区
  bindPosition() {
    this.setData({
      positionFlag: false
    })
    let animation = wx.createAnimation({
      duration: 300,
      timingFunction: 'linear'
    })
    this.animation = animation
    animation.translateY(0).step()
    setTimeout(() => {
      this.setData({
        animationData: this.animation.export()
      })
    }, 200)
  },
  unshade() {
    let animation = wx.createAnimation({
      duration: 300,
      timingFunction: 'linear'
    })
    this.animation = animation
    animation.translateY(306).step()
    this.setData({
      animationData: this.animation.export()
    })
    setTimeout(() => {
      this.setData({
        positionFlag: true
      })
    }, 300)
  },
  bindunshade() {
    this.unshade()
  },
  onCalendarChange(e) {
    this.setData({
      regIndex: 258,
      area: e.detail.provinceName + e.detail.cityListName + e.detail.areaListName,
      ['form.nursing_workers_province']: e.detail.provinceNameId,
      ['form.nursing_workers_city']: e.detail.cityListId,
      ['form.nursing_workers_town']: e.detail.areaListId
    })
  },
})
